<template>
    <div class="header">
        <div>
            <!-- $event：显式传递事件对象 -->
            <input type="checkbox" :checked="isCheckAll" @change="$emit('changeAllStatus', $event.target.checked)" />全选
        </div>
        <div>商品</div>
        <div>数量</div>
        <div>单价（元）</div>
        <div>金额（元）</div>
        <div>操作</div>
    </div>
</template>

<script setup>
defineProps(['isCheckAll'])
</script>

<style>
.header {
    display: flex;
}

.header div {
    padding: 10px;
}
</style>